<include file="Common:header" />
<div class="table_content">
    <form action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME)}" method="post" autocomplete="off" class="ajax_form">
        <table class="edit_table">
            <if condition="$type eq 'group'">
                <tr>
                    <td class="tablehead">分组名</td>
                    <td>
                        <input type="text" class="text w150 required" name="title" value="{$menuInfo.name}"/><label class="tips">例：user_groups（全小写）</label>
                    </td>
                </tr>
                <elseif condition="$type eq 'class'" />
                <tr>
                    <td class="tablehead">分类名</td>
                    <td>
                        <input type="text" class="text w150 required" name="title" value="{$menuInfo.name}"/><label class="tips">例：goods_management（全小写）</label>
                    </td>
                </tr>
                <else />
                <tr>
                    <td class="tablehead">菜单名</td>
                    <td><input type="text" class="text w150 required" name="title" value="{$menuInfo.name}"/><label class="tips">例：add_menu（全小写）</label></td>
                </tr>
                <tr>
                    <td class="tablehead">方法名</td>
                    <td><input type="text" class="text w150 required" name="name" value="{$menuInfo.name}"/><label class="tips">例：Menu/add_menu（区分大小写）</label></td>
                </tr>
                <tr>
                    <td class="tablehead">附加参数</td>
                    <td><input type="text" class="text w150" name="parameter" value="{$menuInfo.parameter}"/><label class="tips">例：?id=1&name=abc</label></td>
                </tr>
            </if>
            <tr>
                <td class="tablehead">是否显示</td>
                <td>
                    <span class="radio">
                        <input type="radio" id="radio1" name="is_show" value="1" <if condition="is_null($menuInfo['is_show']) or ($menuInfo['is_show'] eq 1)">checked</if> /><label for="radio1">显示</label>
                        <input type="radio" id="radio2" name="is_show" value="0" <if condition="!is_null($menuInfo['is_show']) and $menuInfo['is_show'] eq 0">checked</if> /><label for="radio2">隐藏</label>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="tablehead">是否开启</td>
                <td>
                    <span class="radio">
                        <input type="radio" id="radio3" name="status" value="1" <if condition="is_null($menuInfo['status']) or ($menuInfo['status'] eq 1)">checked</if> /><label for="radio3">启用</label>
                        <input type="radio" id="radio4" name="status" value="0" <if condition="! is_null($menuInfo['status']) and ($menuInfo['status'] eq 0)">checked</if> /><label for="radio4">禁用</label>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="tablehead">备注</td>
                <td>
                    <input type="text" name="remark" class="text w150 required" value="{$menuInfo.remark}"/><label class="tips">例：菜单管理</label>
                </td>
            </tr>
            <tr>
                <td class="tablehead">排序</td>
                <td>
                    <input type="text" name="sort" class="text w150" value="{$menuInfo.sort}" placeholder="0"/>
                </td>
            </tr>
            <tr>
                <td class="tablehead">
                    <input type="hidden" name="type" value="{$type}"/>
                    <input type="hidden" name="pid" value="{$pid}"/>
                    <input type="hidden" name="id" value="{$menuInfo.id}"/>
                </td>
                <td>
                    <input type="button" class="save_btn" value="保存"/>
                    <input type="button" class="back_btn" value="返回"/>
                </td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript">
    $('input.save_btn').click(function() {
        $(this).tyAjax({
            callBack: function(data) {
                callBackTips(data.status, data.info, data.url);
            }
        });
    });
</script>
<include file="Common:footer" />